package Demo_zhuanshu01.X3;

import Demo07.Demo04.Message;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Day03_Test {
    public static void main(String[] args) throws IOException, IOException {
        Message ss = new Message();
        ss.setInput("123");
        ss.setOutput("1234");
        ss.setMessage("2344");
        DateFormat dd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date now = new Date();
        String date = dd.format(now);
        ss.setData(date);
        ss.toString();
        BufferedWriter bw = new BufferedWriter(new FileWriter("message.data"));
        String s = ss.toString();
        while (s != null) {
            bw.write(s);
            break;
        }
        System.out.println(s);

        bw.close();

    }

}
